<?php
namespace Admin\Controller;
use Think\Controller;
class OrderController extends Controller
{
	// 列表
        	public function AddOrder()
        	{
        	    $model=D('Order');
        	    if($model->create()){
        	      if($model->add()){
        	        $this->success('订单成功',U('__SEFT__'),true);
        	      }else{
        	         $this->error('订单失败',U('__SEFT__'),true);
        	      }
        	    }
        	}


	// 列表
    	public function GetOrder()
    	{
    	    $where = array();
    	    $phone = $_GET ['phone'];
            if($phone)
            $where['phone'] = array('eq', $phone);
            $data = D ( 'Order' )->where($where)->select ();
            //echo D ( 'Order' )->getLastSql();
            $this->ajaxReturn ( $data );

    	}
}














